#include "plugin_c.h"
#include <iostream>
#include "iplugin_a.h"
#include "iplugin_b.h"
using namespace std;

PluginC::PluginC()
{}

PluginC::~PluginC()
{}

void
PluginC::call_a_b()
{
    cout << "PluginC::call_a_b" << endl;

    x3::Object<iPluginA> pa1(clsid_a), pa2(clsid_a);
    if (pa1)
    {
        printf("The plugin is loaded (%s in %s).\n",
               pa1->getInterfaceName(), pa1->getClassName());
    }
    else
    {
        printf("The plugin is not loaded.\n");
    }
    printf("PluginC::call_a_b: pa1: 0x%x, %d, pa2: 0x%x, %d\n\n", &pa1, pa1->add(1, 2), &pa2, pa2->add(3, 4));
}
